buffer substring issues

I am trying to use the probeRichAttr_ function to get a string from an object. I need to be able to separate the string for comparison, but nothing is displayed. I placed the example from the DXL help in my code and it works fine, but the example defines a string instead of using probeRichAttr. Does this process work using probeRichAttr or is there another way I should be going about this?

Thanks!
SystemAdmin - Fri Jun 26 13:58:59 EDT 2009

Re: buffer substring issues
IBM_Gust - Tue Jun 30 07:56:35 EDT 2009

Questions in stated in good English that are clear have best chance of being answered.

Re: buffer substring issues
SystemAdmin - Tue Jun 30 09:51:06 EDT 2009

IBM_Gust - Tue Jun 30 07:56:35 EDT 2009
Questions in stated in good English that are clear have best chance of being answered.

"Questions in stated in good English. . . " good advice.

I think what you're trying to say is that the below code works

Buffer buf = create
buf = "abcd"
string s = buf0:2

but this doesn't

Buffer buf = create
buf = probeRichAttr_(x,"Date",false)
string s = buf0:2

I've had the same problem, but I haven't figured it out yet.

Re: buffer substring issues
llandale - Tue Jun 30 10:30:44 EDT 2009

SystemAdmin - Tue Jun 30 09:51:06 EDT 2009
"Questions in stated in good English. . . " good advice.

I think what you're trying to say is that the below code works

Buffer buf = create
buf = "abcd"
string s = buf0:2

but this doesn't

Buffer buf = create
buf = probeRichAttr_(x,"Date",false)
string s = buf0:2

I've had the same problem, but I haven't figured it out yet.

I think in your two examples, if you printed the 'length' of the buffer you'll see that the first is several bytes long, and the second is several hundred bytes long. The first few characters of rich text is rich text tags, and of course won't print right.

You could also print your entire 's' string to see what's really in there. Perhaps its 'print "\n"'

  • Louie

In your last sentence, you are mixing verb tenses. Either use "have and "haven't" or "had" and "hadn't". Perhaps you didn't read your first sentence. lol

Re: buffer substring issues
llandale - Tue Jun 30 10:35:19 EDT 2009

llandale - Tue Jun 30 10:30:44 EDT 2009
I think in your two examples, if you printed the 'length' of the buffer you'll see that the first is several bytes long, and the second is several hundred bytes long. The first few characters of rich text is rich text tags, and of course won't print right.

You could also print your entire 's' string to see what's really in there. Perhaps its 'print "\n"'

  • Louie

In your last sentence, you are mixing verb tenses. Either use "have and "haven't" or "had" and "hadn't". Perhaps you didn't read your first sentence. lol

... perhaps its 'print "*" (richText(s)) "*\n"